package cloud.controller;

import api.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: liwensihan
 * @Date: 2021/12/8 16:46
 * @Description:
 */
@RestController
public class UserController {
    @Reference
    private UserService userService;

    @GetMapping("name/{name}")
    public String getName(@PathVariable(name = "name") String name){
      return   userService.getUserName(name);
    }

}
